<%--
 - Copyright (c) 2009-2011 ETCORE Labs. All rights reserved. 
 - 
 - This software is the confidential and proprietary information of ETCORE Labs. 
 - You shall not disclose such confidential information and shall use it only
 - in accordance with the terms of the license agreement you entered into
 - with ETCORE Labs.
 -
 - Support can be obtained from support forums at:
 - http://www.etcore.com/
 -
 - @author: ETCORE GroupTalk developers
 -
 --%>
<%@ page contentType="text/html; charset=utf-8" pageEncoding="utf-8"%>
<%@ taglib uri="http://jakarta.apache.org/taglibs/core" prefix="c"%>
<%@ taglib uri="http://www.etcore.com/grouptalk" prefix="grouptalk"%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title><c:out value='${context.edit}' />-<c:out
	value='${messageDetail.name}' />-<c:out value='${context.title}' /></title>
<link rel="stylesheet" href="/group/css/styles.css" type="text/css">

<c:if test="${isAdmin }">
	<script type="text/javascript"
		src="/group/ui-component/tinymce/jscripts/tiny_mce/tiny_mce.js"></script>
	<script type="text/javascript">
	tinyMCE.init({
		 // General options
         mode : "exact",
        elements : "tag",      
        theme : "advanced",
        plugins : "spellchecker,pagebreak,style,layer,table,save,advhr,advimage,advlink,emotions,iespell,inlinepopups,insertdatetime,preview,media,searchreplace,print,contextmenu,paste,directionality,fullscreen,noneditable,visualchars,nonbreaking,xhtmlxtras,template",
        <c:if test="${lang eq 'local'}"> language: "zh",</c:if>
        // Theme options
        theme_advanced_buttons1 : "save,newdocument,|,bold,italic,underline,strikethrough,|,justifyleft,justifycenter,justifyright,justifyfull,|,styleselect,formatselect,fontselect,fontsizeselect",
        theme_advanced_buttons2 : "cut,copy,paste,pastetext,pasteword,|,search,replace,|,bullist,numlist,|,outdent,indent,blockquote,|,undo,redo,|,link,unlink,anchor,image,cleanup,help,code,|,insertdate,inserttime,preview,|,forecolor,backcolor",
        theme_advanced_buttons3 : "tablecontrols,|,hr,removeformat,visualaid,|,sub,sup,|,charmap,emotions,iespell,media,advhr,|,print,|,ltr,rtl,|,fullscreen",
        theme_advanced_buttons4 : "insertlayer,moveforward,movebackward,absolute,|,styleprops,spellchecker,|,cite,abbr,acronym,del,ins,attribs,|,visualchars,nonbreaking,template,blockquote,pagebreak,|,insertfile,insertimage",
        theme_advanced_toolbar_location : "top",
        theme_advanced_toolbar_align : "center",
        theme_advanced_statusbar_location : "bottom",
        theme_advanced_resizing : true,
        theme_advanced_source_editor_height:"300",
        // Skin options
        skin : "o2k7",
        skin_variant : "silver"
	});
</script>

</c:if>
<script language="javascript">

function checkEditBookmarkForm()
{
	  if(EditBookmarkForm.tid.value==""||EditBookmarkForm.tid.value=="-1")
	  {
	  alert("<c:out value='${context.msg_topic_error }' />");
	  EditBookmarkForm.tid.focus();
	  return false;
	  }
		
  if(EditBookmarkForm.name.value==""||EditBookmarkForm.name.value.replace(/(^\s*)|(\s*$)/g, "")=="")
  {
   alert("<c:out value='${context.msg_title_null }' />");
   EditBookmarkForm.name.focus();
   return false;
  }
  if(EditBookmarkForm.source.value==""||EditBookmarkForm.source.value.replace(/(^\s*)|(\s*$)/g, "")=="")
  {
   alert("<c:out value='${context.source_url}' />?");
   EditBookmarkForm.source.focus();
   return false;
  }
  return true;
}
</script>

</head>

<body bottomMargin=0 leftMargin=10 topMargin=0 onload=preloadImages()
	rightMargin=10 marginheight="0"">

<c:import url="/group/ui-component/divdialog/divdialog.html" />
<table width="100%" border="0" cellpadding="0" cellspacing="0"
	align=center>
	<tr>
		<td><c:import url="/banner.jsp?currentPlatform=${group.open }" /></td>
	</tr>





	<tr>
		<td>
		<table width=100%>
			<tr>

				<td valign=top>
				<table width=100%>


					<tr>
						<td><c:set var="platform" value="platform${group.open}" /> <c:set
							var="platformLabel" value="${context[platform]}" /> <c:set
							var="currentViewer" value="groupadmin" /><c:set
							var="platformViewer" value="groupadmin" /> <c:set
							var="groupViewer" value="groupdetail" /><c:set var="posturl"
							value="?" /> <c:set var="encryptedUrl" value="" /> <c:if
							test="${group.open==3 }">
							<c:set var="currentViewer" value="bookmarks" />
							<c:set var="groupViewer" value="bookmarksadmin" />
						</c:if> <c:if test="${group.open==1 }">
							<c:set var="currentViewer" value="news" />
							<c:set var="posturl" value="?nav=${group.nav }" />
							<c:if test="${group.nav==1 }">
								<c:set var="platformLabel" value="${context.nav1}" />
							</c:if>
						</c:if> <c:if test="${group.open==2 }">
							<c:set var="currentViewer" value="community" />
							<c:if test="${group.nav==1 }">
								<c:set var="platformLabel" value="${context.nav2}" />
							</c:if>
							<c:set var="posturl" value="?nav=${group.nav }" />
						</c:if> <c:if test="${group.open==4 }">
							<c:set var="currentViewer" value="reminders" />
						</c:if> <c:if test="${group.open==0 }">
							<c:set var="posturl" value="?open=0" />
						</c:if>



						<TABLE cellSpacing=0 cellPadding=0 width=100% align=center
							border=0>
							<TBODY>
								<tr>
									<td width=100%>
									<table>
										<tr>
											<td style="margin-left: 15px; color: #808080"><a
												href="/" style="color: #3B5998">${context.homepage }</a> ->
											<a href="${currentViewer }${context.postfix}${posturl}"
												style="color: #3B5998">${platformLabel }</a><c:if
												test="${group.open!=4 }"> -> <a
													style="color: #3B5998"
													href="/group/${page}${context.postfix}?id=${group.id}&gid=${group.id}">${group.name
												}</a>
											</c:if></td>
										</tr>


									</table>
									</td>
								</tr>
								<TR>

									<TD align=center>
									<form name="EditBookmarkForm"
										onSubmit="return checkEditBookmarkForm();" method=post
										action="/group/editBookmark<c:out value='${context.postfix }' />?id=<c:out value='${param.id}'/>&opera=merge">
									<table cellpadding=3 cellspacing=1
										style="border: 1px solid #d2d4d2" width=600 rules=all
										align=center>
										<tr bgcolor="#ffffff">


											<td style="color: #808080" colspan=2><c:if
												test="${isAdmin }">
												<a style="color: #3B5998"
													href="/group/groupadmin${context.postfix}">${context.management
												}</a> -> <a
													href="${platformViewer }${context.postfix}${posturl}&open=${group.open}"
													style="color: #3B5998">${platformLabel }</a> -> <a
													style="color: #3B5998"
													href="/group/${groupViewer}${context.postfix}?id=${group.id}&gid=${group.id}">${group.name
												}</a> -> <a style="color: #3B5998"
													href="/group/${groupViewer}${context.postfix}?id=${group.id}&gid=${group.id}&tid=${topic.id}">${topic.name
												}</a>
											</c:if> &nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a
												style="color: #808080"
												href="/group/messagedetail<c:out value='${context.postfix}'/>?id=<c:out value='${param.id}'/>"><c:out
												value='${context.view}' /></a></TD>
										</TR>
										<tr bgcolor=#f3f3f3>
											<td align=center colspan=2><c:out
												value='${messageDetail.name}' /></td>
										</tr>

										<tr bgcolor="#ffffff">

											<TD><c:out value='${context.msg_topic}' />：</td>
											<td><select name=tid>
												<c:forEach var="currentTopic" items="${topics }">
													<option value="<c:out value='${currentTopic.id}'/>"
														<c:if test="${currentTopic.id==topic.id }">selected</c:if>><c:out
														value='${currentTopic.name}' /></option>

												</c:forEach>

											</select></TD>
										</TR>
										<c:if test="${isAdmin }">
											<tr bgcolor="#ffffff">

												<TD><c:out value='${context.change_time}' />：&nbsp;</td>
												<td><select name=changeTime>
													<option value="false">No</option>
													<option value="true">Yes</option>
												</select></TD>
											</TR>
											<tr bgcolor="#ffffff">

												<TD><c:out value='${context.change_author}' />：&nbsp;</td>
												<td><select name=changeAuthor>
													<option value="false">No</option>
													<option value="true">Yes</option>
												</select></TD>
											</TR>
										</c:if>
										<tr bgcolor="#ffffff">

											<TD><c:out value='${context.msg_title}' /></td>
											<td><input type=text name="name" size=70 maxlength=500
												value='<c:out value='${messageDetail.name}'/>'></TD>
										</tr>

										<tr bgcolor="#ffffff">

											<TD><c:out value='${context.source_url}' /></td>
											<td><input type=text name="source" size=70 maxlength=200
												value="<c:out value='${messageDetail.source}'/>"></TD>
										</TR>

										<tr bgcolor="#ffffff">
											<td><c:out value='${context.text_rank}' />:</TD>
											<TD><select name=up>
												<option value="0"
													<c:if test='${messageDetail.up==0}'> selected</c:if>>OFF</option>
												<c:set var="num" value="1" />
												<c:forEach begin="1" end="10" step="1">

													<option value="${11-num}"
														<c:if test='${messageDetail.up==11-num}'> selected</c:if>><c:out
														value='${num}'></c:out></option>
													<c:set var="num" value="${num+1 }" />
												</c:forEach>
											</select></TD>
										</TR>
										<tr bgcolor="#ffffff">
											<td align="left" colspan=2><c:out
												value='${context.link_tip}' />:</td>

										</tr>
										<tr bgcolor="#ffffff">

											<TD colspan=2><textarea id="tag" name=tag cols="70"
												rows="20" class="textarea"><c:out
												value='${messageDetail.tag}' escapeXml="false" /></textarea></TD>

										</TR>

										<tr bgcolor="#ffffff">

											<TD align=center colspan=2><input type=submit
												value="<c:out value='${context.button_ok}' />"></TD>

										</tr>
									</table>
									</form>
									</TD>
								</TR>
							</TBODY>
						</TABLE>

						</td>
					</tr>
				</table>
				</td>
			</tr>
		</table>
		</td>
	</tr>

	<tr>
		<td><BR>
		<BR>
		<c:import url="/footer.jsp" /></td>
	</tr>


</table>


<c:if test="${not empty msg}">
	<script>alert('${msg }')</script>
</c:if>


</body>
</html>


